home *** CD-ROM | disk | FTP | other *** search
/ Aminet 51 / Aminet 51 (2002)(GTI - Schatztruhe)[!][Oct 2002].iso / Aminet / dev / c / minigl.lha / MiniGL / include / mgl / clip.h next >
Encoding:
C/C++ Source or Header  |  2002-05-06  |  1.1 KB  |  55 lines

  1. /*
  2.  * $Id: clip.h,v 1.1.1.1 2000/04/07 19:44:51 tfrieden Exp $
  3.  *
  4.  * $Date: 2000/04/07 19:44:51 $
  5.  * $Revision: 1.1.1.1 $
  6.  *
  7.  * (C) 1999 by Hyperion
  8.  * All rights reserved
  9.  *
  10.  * This file is part of the MiniGL library project
  11.  * See the file Licence.txt for more details
  12.  *
  13.  */
  14.  
  15.  
  16. #ifndef _CLIP_H
  17. #define _CLIP_H
  18.  
  19.  
  20. /*
  21. ** This structure holds the polygon data for clipping.
  22. */
  23.  
  24. typedef struct MGLPolygon_t
  25. {
  26.     int numverts;
  27.     int verts[MGL_MAXVERTS];
  28. } MGLPolygon;
  29.  
  30.  
  31. /* Flexible Mesh-index - used for clip-buffering*/
  32.  
  33. typedef struct PolyBuffer_s
  34. {
  35.     int numverts;
  36.     int nextfree;    //used for clipping
  37.     ULONG type;    //w3dtype
  38.     ULONG verts[64]; //check length for triangle-chains
  39. } PolyBuffer;
  40.  
  41.  
  42. void dh_DrawLine(GLcontext context, MGLPolygon *poly);
  43. void dh_DrawPoly(GLcontext context, MGLPolygon *poly);
  44.  
  45. void hc_ClipPoly(GLcontext context, MGLPolygon *poly, PolyBuffer *out, int clipstart, ULONG or_codes);
  46.  
  47. void hc_ClipPolyFF(GLcontext context, MGLPolygon *poly, ULONG or_codes);
  48.  
  49. GLboolean hc_DecideFrontface(GLcontext context, MGLVertex *a, MGLVertex *b, MGLVertex *c);
  50.  
  51. #endif
  52.  
  53.  
  54.  
  55.